package com.tenbent.product.center.insures.bo;

import com.tenbent.product.base.bo.BizObject;
import com.tenbent.product.base.mybatis.annotations.TypeAlias;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 保障套餐
 *
 * @author Randy
 *
 *         Created by ThinkPad on 2017/8/21.
 */
@Entity
@Table(name = "pc_safeguard_package")
@TypeAlias("safeguardPackage")
public class SafeguardPackage extends BizObject {

	/** 产品ID **/
	@Column(name = "product_id")
	private Integer productId;

	/** 套餐代码 **/
	@Column(name = "package_code")
	private String packageCode;

	/** 套餐名称 **/
	@Column(name = "package_name")
	private String packageName;

	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	public String getPackageCode() {
		return packageCode;
	}

	public void setPackageCode(String packageCode) {
		this.packageCode = packageCode;
	}

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		SafeguardPackage that = (SafeguardPackage) o;

		if (productId != null ? !productId.equals(that.productId) : that.productId != null)
			return false;
		if (packageCode != null ? !packageCode.equals(that.packageCode) : that.packageCode != null)
			return false;
		return packageName != null ? packageName.equals(that.packageName) : that.packageName == null;

	}

	@Override
	public int hashCode() {
		int result = productId != null ? productId.hashCode() : 0;
		result = 31 * result + (packageCode != null ? packageCode.hashCode() : 0);
		result = 31 * result + (packageName != null ? packageName.hashCode() : 0);
		return result;
	}

	@Override
	public String toString() {
		return "SafeguardPackage{" + "productId=" + productId + ", packageCode='" + packageCode + '\''
				+ ", packageName='" + packageName + '\'' + '}';
	}
}
